package com.itboye.ihomebank.activity.myzhujia.qianbao;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.base.BaseOtherActivity;
import com.itboye.ihomebank.util.OnPasswordInputFinish;
import com.itboye.ihomebank.util.PasswordView;

/**
 * 设置支付密码
 * 
 */
public class ActivityZhiFuPassSheZhi extends BaseOtherActivity {
	View v_statusbar;
	TextView add_shap_title_tv;
	ImageView close_icon;

	PasswordView pwdView;// 支付密码

	String paypent_pass;

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.close_icon:
			finish();
			break;

		default:
			break;
		}

	}

	public static ActivityZhiFuPassSheZhi context;

	public static ActivityZhiFuPassSheZhi getInstance() {
		return context;
	}

	@Override
	protected int layout_id() {
		return R.layout.activity_zhifu_pass_shezhi;
	}

	protected void onInitController() {
		final PasswordView pwdView = (PasswordView) findViewById(R.id.pwd_view);

		// 添加密码输入完成的响应
		pwdView.setOnFinishInput(new OnPasswordInputFinish() {
			@Override
			public void inputFinish() {
				// 输入完成后跳转
				// 也就是说——>实现你的交易逻辑什么的在这里写

				paypent_pass = pwdView.getStrPassword();
				Intent intent = new Intent(ActivityZhiFuPassSheZhi.this,
						ActivityZhiFuPassSheZhiTwo.class);
				intent.putExtra("pass", paypent_pass);
				startActivity(intent);

			}
		});

	}

	@Override
	protected void onInit() {
		setStatusBarHeight(v_statusbar);
		context=this;
		add_shap_title_tv.setText("设置支付密码");

	}

	@Override
	protected void onReadIntent(Bundle bundle) {

	}

}
